package modulebll

import (
	"fmt"
)

var (
	// 所有用到的模块定义
	allAlias map[string]string = make(map[string]string, 0)
)

var (
	// 组队副本模块
	Con_TeamBattle = newModuleAlias("Expedition")

	// 密境之争模块配置
	//Con_UnChartedAlias = newModuleAlias("Uncharted")

	// 冰火岛模块配置
	Con_MoonvstodAlias = newModuleAlias("Moonvstod")

	//// 玩家信息模块配置
	//Con_Player = newModuleAlias("Player")
	//
	//// 邮件模块配置
	//Con_Email = newModuleAlias("Email")
	//
	// 矿战模块配置
	Con_Kuangzhan = newModuleAlias("KuangZhan")

	// 矿战模块配置
	Con_Dart = newModuleAlias("Dart")

	// 比武论道模块配置
	Con_BiWu = newModuleAlias("BiWu")

	// 群策群力模块配置
	Con_TeamCopy = newModuleAlias("TeamCopy")

	// 巅峰对决阵容模块
	Con_Hegemony = newModuleAlias("Hegemony")

	Con_HegemonyFirst = newModuleAlias("HegemonyFirst")

	Con_HegemonySecond = newModuleAlias("HegemonySecond")

	Con_HegemonyThird = newModuleAlias("HegemonyThird")

	Con_HegemonyFourth = newModuleAlias("HegemonyFourth")

	Con_HegemonyFifth = newModuleAlias("HegemonyFifth")
	// 决战武林模块配置
	Con_Leaguetopfinal = newModuleAlias("LeaguetopFinal")

	// 华山之巅模块
	Con_Huashan = newModuleAlias("Huashan")

	Con_HuashanFirst = newModuleAlias("HuashanFirst")

	Con_HuashanSecond = newModuleAlias("HuashanSecond")

	Con_HuashanThird = newModuleAlias("HuashanThird")

	// 冠绝群雄
	Con_BestOne       = newModuleAlias("BestOne")
	Con_BestOneFirst  = newModuleAlias("BestOneFormation1")
	Con_BestOneSecond = newModuleAlias("BestOneFormation2")
	Con_BestOneThird  = newModuleAlias("BestOneFormation3")
	Con_BestOneFour   = newModuleAlias("BestOneFormation4")
	Con_BestOneFive   = newModuleAlias("BestOneFormation5")

	// 决战光明顶模块
	Con_Bright = newModuleAlias("Bright")

	Con_BrightFirst = newModuleAlias("BrightTeam1")

	Con_BrightSecond = newModuleAlias("BrightTeam2")

	Con_BrightThird = newModuleAlias("BrightTeam3")

	Con_BrightFourth = newModuleAlias("BrightTeam4")

	Con_BrightFifth = newModuleAlias("BrightTeam5")

	Con_TrainTower = newModuleAlias("TrainTower")

	Con_Pet = newModuleAlias("Pet")
)

// 新增一个模块定义
func newModuleAlias(alias string) string {
	_, exist := allAlias[alias]
	if exist {
		panic(fmt.Errorf("存在重复的模块配置:%v", alias))
	}

	allAlias[alias] = alias

	return alias
}

// 获取所有模块定义
func GetAllModuleAlias() map[string]string {
	return allAlias
}
